//
//  RadioSecondTableViewCell.m
//  时光
//
//  Created by dllo on 16/3/26.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "RadioSecondTableViewCell.h"

@implementation RadioSecondTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatSubView];
    }
    return  self;
}

- (void)creatSubView{
    
    self.imageVie = [[UIImageView alloc] initWithFrame:CGRectMake(10 * W, 10 * H, 80 * W, 80 * W)];
    
    
    [self.contentView addSubview:self.imageVie];
    
    self.labelsongname = [[UILabel alloc] initWithFrame:CGRectMake(100 * W, 10 * H, 250 * W, 30 * H)];
    self.labelsongname.font = [UIFont systemFontOfSize:18 * H weight:0.1];
    [self.contentView addSubview:self.labelsongname];
    
    self.labelsonger = [[UILabel alloc] initWithFrame:CGRectMake(100 * W, 50 * H, 250 * W, 30 * H)];
    self.labelsonger.textColor = [UIColor grayColor];
    self.labelsonger.font = [UIFont systemFontOfSize:16 * H];
    [self.contentView addSubview: self.labelsonger];
    
   
    
//    self.btn = [UIButton buttonWithType:UIButtonTypeCustom];
//    self.btn.frame = CGRectMake(360 * W, 110 * H, 20 * W, 20 * W);
//    [self.btn setImage:[UIImage imageNamed:@"iconfont-pinglun-2"] forState:UIControlStateNormal];
//    [self.contentView addSubview:self.btn];
}

- (void)setModel:(RadioSecondModel *)model{
    _model = model;
    [self.imageVie sd_setImageWithURL:[NSURL URLWithString:model.thumbnail_url] placeholderImage:[UIImage imageNamed:@"1920329c2e54f271d719def0d6f179fe.jpg"]];
    self.labelsonger.text = model.songer;
    self.labelsongname.text = model.songname;
}




@end
